home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 84 / 084.d81 / source codes / LOW BOX SOURCE < prev    next >
Encoding:
Text File  |  1991-01-01  |  13.0 KB  |  1,146 lines

  1. .org $0800
  2. ;mem
  3. .obj "toolbox $0800.o"
  4. lda 648
  5. cmp current'screen
  6. beq +
  7. jsr set'screen'table
  8.  
  9. + jsr line'links
  10.  
  11. ldx #1
  12. stx numbers'to'get
  13. jsr get'number  ;get function number
  14.  
  15. lda number
  16.  
  17. cmp #11
  18. bcc +
  19. jmp other'table
  20.  
  21. + cmp #0
  22. beq help
  23. cmp #1
  24. beq mline
  25. cmp #2
  26. beq message
  27. cmp #3
  28. beq message'custom
  29. cmp #4
  30. beq screen'stash'enter
  31. cmp #5
  32. beq screen'restore'enter
  33. cmp #6
  34. beq fill'enter
  35. cmp #7
  36. beq box'enter
  37. cmp #8
  38. beq clear'line
  39. cmp #9
  40. beq character'swap
  41. cmp #10
  42. beq color'swap
  43. rts
  44.  
  45. help jsr helpsc
  46. rts
  47.  
  48. mline jsr move'line2
  49. rts
  50.  
  51. message'custom ldx #6
  52. stx numbers'to'get
  53. jsr get'number
  54. jsr set'message
  55. jsr message
  56. rts
  57.  
  58. message jsr get'string
  59. jsr message'routine
  60. rts
  61.  
  62. screen'stash'enter ldx #1
  63. stx numbers'to'get
  64. jsr get'number
  65. jsr screen'stash
  66. rts
  67.  
  68. screen'restore'enter ldx #1
  69. stx numbers'to'get
  70. jsr get'number
  71. jsr screen'restore
  72. rts
  73.  
  74. fill'enter ldx #5
  75. stx numbers'to'get
  76. jsr get'number
  77. fill'routine jsr wait
  78. filler jsr fill
  79. inc number
  80. ldx number
  81. cpx number+1
  82. bcc filler
  83. rts
  84.  
  85. color'swap jsr color
  86. rts
  87.  
  88. character'swap jsr char
  89. rts
  90.  
  91. box'enter ldx #6
  92. stx numbers'to'get
  93. jsr get'number
  94. box'routine jsr wait
  95. boxer jsr box
  96. inc number
  97. ldx number
  98. cpx number+1
  99. bcc boxer
  100. rts
  101.  
  102. clear'line ldx #2
  103. stx numbers'to'get
  104. jsr get'number     
  105. jsr wait
  106. ldx number
  107. - jsr 59903
  108. inc number
  109. ldx number
  110. cpx number+1
  111. bcc -
  112. rts
  113.  
  114. other'table cmp #11
  115. beq rvs'enter
  116. cmp #12
  117. beq dir'enter
  118. cmp #13
  119. beq file'read'enter
  120. rts
  121.  
  122. rvs'enter ldx #5
  123. stx numbers'to'get
  124. jsr get'number
  125. rvs'routine jsr wait
  126. rvser jsr rvs
  127. inc number
  128. ldx number
  129. cpx number+1
  130. bcc rvser
  131. rts
  132.  
  133. dir'enter ldx #1
  134. stx numbers'to'get
  135. jsr get'number
  136. lda number
  137. sta device
  138. jsr get'string
  139. lda #6
  140. sta number
  141. jsr screen'stash
  142. lda #0
  143. sta 212
  144. lda #147
  145. jsr $ffd2
  146. jsr dir
  147. - jsr $ffe4
  148. beq -
  149. lda #6
  150. sta number
  151. jsr screen'restore
  152. rts
  153.  
  154. file'read'enter ldx #2
  155. stx numbers'to'get
  156. jsr get'number
  157. lda number
  158. sta device
  159. lda number+1
  160. sta flag
  161. jsr get'string
  162. lda #6
  163. sta number
  164. jsr screen'stash
  165. lda #0
  166. sta 212
  167. lda #147
  168. jsr $ffd2
  169. jsr file'read
  170. lda #6
  171. sta number
  172. jsr screen'restore
  173. rts
  174.  
  175. ;**** get number from BASIC ****
  176.  
  177. get'number ldx #0
  178. stx current'number
  179.  
  180. - jsr $aefd
  181. jsr $ad8a
  182. jsr $b7f7
  183. lda $14  ; got it!
  184.  
  185. ldx current'number
  186. sta number,x
  187. inc current'number
  188. dec numbers'to'get
  189. beq +
  190. bne -
  191. + rts
  192.  
  193. ;***** get string from BASIC ****
  194.  
  195. get'string jsr $aefd
  196. jsr $ad9e
  197. jsr $b6a3
  198.  
  199. ldx $22
  200. ldy $23
  201. stx 251
  202. sty 252
  203. cmp #41
  204. bcc +
  205. lda #40
  206. + sta string'length
  207. tay
  208.  
  209. - lda (251),y
  210. sta string3,y
  211. dey
  212. bpl -
  213. rts
  214.  
  215. ;**** Line Links ****
  216.  
  217. line'links ldy #24
  218. - lda 217,y
  219. ora #128
  220. sta 217,y
  221. dey
  222. bpl -
  223. rts
  224.  
  225. ;**** wait ****
  226. wait lda 53265       
  227. bpl wait   
  228. rts
  229.  
  230. ;**** SCREEN STASH ****
  231.  
  232. screen'stash ldy number
  233. cpy #11; ahem!  there are only 11 screens (0-8)
  234. bcc +
  235. rts
  236.  
  237. + sei
  238. ldx #0
  239. lda 1
  240. sta temp
  241. stx 1
  242. lda screens,y
  243. stx 253
  244. sta 254;  dest screen
  245. lda 648
  246. sta 252;  source screen
  247. ldy #0
  248. sty 251
  249.  
  250. ;begin copying
  251.  
  252. - lda (251),y
  253. sta (253),y
  254. iny
  255. bne -
  256. inx
  257. inc 254
  258. inc 252
  259.  
  260. cpx #4
  261. bne -
  262. ldx #0
  263.  
  264. lda #>55296
  265. sta 252
  266.  
  267. - dec 1
  268. lda (251),y
  269. inc 1
  270. sta (253),y
  271. iny
  272. bne -
  273. inc 252
  274. inc 254
  275. inx
  276. cpx #4
  277. bne -
  278.  
  279. lda temp
  280. sta 1
  281. cli
  282. lda 53280
  283. ldy number
  284. sta border,y
  285. lda 53281
  286. sta background,y
  287. rts
  288.  
  289. screen'restore  ldy number
  290. cpy #11; ahem!  there are only 11 screens (0-8)
  291. bcc +
  292. rts
  293.  
  294. / lda 53265
  295. bpl -
  296.  
  297. sei
  298. ldx #0
  299. lda 1
  300. sta temp
  301. stx 1
  302. lda screens,y
  303. stx 253
  304. sta 254;  source screen
  305. lda 648
  306. sta 252;  dest screen
  307. ldy #0
  308. sty 251
  309.  
  310. ;begin copying
  311.  
  312. - lda (253),y
  313. sta (251),y
  314. iny
  315. bne -
  316. inx
  317. inc 254
  318. inc 252
  319.  
  320. cpx #4
  321. bne -
  322. ldx #0
  323.  
  324. lda #>55296
  325. sta 252
  326.  
  327. - lda (253),y
  328. dec 1
  329. sta (251),y
  330. inc 1
  331. iny
  332. bne -
  333. inc 252
  334. inc 254
  335. inx
  336. cpx #4
  337. bne -  
  338.  
  339. lda temp
  340. sta 1
  341. cli
  342.  
  343. ldy number
  344. lda border,y
  345. sta 53280
  346. lda background,y
  347. sta 53281
  348. rts
  349.  
  350. ;****** HELP ******
  351.  
  352. helpsc lda #6
  353. sta number
  354. jsr screen'stash
  355.  
  356. lda #0
  357. sta 53280
  358. sta 53281
  359.  
  360. lda #0
  361. sta 212
  362. lda #147
  363. jsr $ffd2
  364.  
  365. lda #>chunk'o'text
  366. sta 252
  367. lda #<chunk'o'text
  368. sta 251
  369. ldy #0
  370.  
  371. - lda (251),y
  372.  
  373. beq finis
  374. cmp #"\"
  375. beq switch'to'white
  376. cmp #"@"
  377. beq switch'to'cyan'reverse
  378.  
  379. bump'help jsr $ffd2
  380. cmp #13
  381. bne +
  382. lda 214
  383. cmp #23
  384. bne +
  385. sty temp
  386. jsr press
  387. lda #0
  388. sta 212
  389. lda #147
  390. jsr $ffd2
  391. ldy temp
  392.  
  393. + iny
  394. bne -
  395. inc 252
  396. bne -
  397.  
  398. switch'to'white lda #1
  399. sta 646
  400. lda #0
  401. sta 199
  402. jmp bump'help
  403.  
  404. switch'to'cyan'reverse lda #3
  405. sta 646
  406. sta 199
  407. jmp bump'help
  408.  
  409. finis lda #0
  410. sta 198
  411.  
  412. jsr press
  413.  
  414. lda #6
  415. sta number
  416. jsr screen'restore
  417. rts
  418.  
  419. ;**** move line ****
  420. ;from line, to line
  421.  
  422. move'line2 ldx #2
  423. stx numbers'to'get
  424. jsr get'number
  425. jsr wait
  426. jsr move
  427. rts
  428.  
  429. move lda number
  430. bpl +
  431. sec
  432. sbc #128
  433. + cmp #25
  434. bcc +
  435. rts
  436. + asl
  437. tay
  438. lda color'mem,y
  439. sta 251
  440. lda screen'mem,y
  441. sta 253
  442. iny
  443. lda color'mem,y
  444. sta 252
  445. lda screen'mem,y
  446. sta 254
  447.  
  448. ldy #39
  449. - lda (253),y
  450. sta string,y
  451. lda (251),y
  452. sta string2,y
  453. dey
  454. bpl -
  455.  
  456. ldx number
  457. bmi +
  458. jsr 59903
  459.  
  460. + lda number+1
  461. asl
  462. tay
  463. lda color'mem,y
  464. sta 251
  465. lda screen'mem,y
  466. sta 253
  467. iny
  468. lda color'mem,y
  469. sta 252
  470. lda screen'mem,y
  471. sta 254
  472.  
  473. ldy #39
  474. - lda string,y
  475. sta (253),y
  476. lda string2,y
  477. sta (251),y
  478. dey
  479. bpl -
  480.  
  481. lda #19    
  482. jmp $ffd2   
  483.  
  484.  
  485. ;**** FILL **** line,to line,col,to col,color
  486.  
  487. fill lda number
  488. cmp #25
  489. bcc +
  490. rts
  491. + asl
  492. tay
  493. lda color'mem,y
  494. sta 251
  495. iny
  496. lda color'mem,y
  497. sta 252
  498.  
  499.  
  500. ldy number+3
  501. lda number+4
  502. - sta (251),y
  503. dey
  504. bmi +
  505. cpy number+2
  506. bcs -
  507.  
  508. + rts
  509.  
  510. ;**** BOX **** lin,tlin,col,to col,s-code,color
  511.  
  512. box lda number
  513. asl
  514. tay
  515. lda color'mem,y
  516. sta 251
  517. lda screen'mem,y
  518. sta 253
  519. iny
  520. lda color'mem,y
  521. sta 252
  522. lda screen'mem,y
  523. sta 254
  524.  
  525. ldy number+3
  526. - lda number+4
  527. sta (253),y
  528. lda number+5
  529. sta (251),y
  530. dey
  531. bmi +
  532. cpy number+2
  533. bcs -
  534. + rts
  535.  
  536. ;********** color swap ******
  537. ;color,to color
  538.  
  539. color ldx #2
  540. stx numbers'to'get
  541. jsr get'number
  542.  
  543. lda #>55296
  544. sta 252
  545. ldx #1
  546. ldy #0
  547. sty 251
  548.  
  549. jsr wait
  550.  
  551. - lda (251),y
  552. and #15
  553. cmp number
  554. beq change'color
  555. iny
  556. bne -
  557. inx
  558. inc 252
  559. cpx #5
  560. bne -
  561. rts
  562.  
  563. change'color lda number+1
  564. sta (251),y
  565. jmp -
  566.  
  567. ;********** char swap ******
  568. ;char,to char,color
  569.  
  570. char ldx #3
  571. stx numbers'to'get
  572. jsr get'number
  573.  
  574. lda #>55296
  575. sta 254
  576. ldx #1
  577. ldy #0
  578. sty 251
  579. sty 253
  580. lda 648
  581. sta 252
  582.  
  583. jsr wait
  584.  
  585. - lda (251),y
  586. cmp number
  587. beq swap
  588. iny
  589. bne -
  590. inx
  591. inc 252
  592. inc 254
  593. cpx #5
  594. bne -
  595. rts
  596.  
  597. swap lda number+1
  598. sta (251),y
  599. lda number+2
  600. bmi +
  601. sta (253),y
  602. + jmp -
  603.  
  604. ;**** MESSAGE ****
  605.  
  606. message'routine lda #6
  607. sta number
  608. jsr screen'stash
  609.  
  610. lda fade'screen
  611. beq naw
  612. lda #0
  613. sta number
  614. sta number+2
  615. lda #24
  616. sta number+1
  617. lda #39
  618. sta number+3
  619. lda fade'color
  620. sta number+4
  621. jsr fill'routine
  622.  
  623. naw ldy #5
  624. - lda box'parms,y
  625. sta number,y
  626. dey
  627. bpl -
  628.  
  629. jsr box'routine
  630.  
  631. lda string'length
  632. lsr
  633. sta string'length+1
  634. lda #20
  635. sec
  636. sbc string'length+1
  637. sta string'length+1
  638. lda starting'line
  639. clc
  640. adc #1
  641. tax
  642. ldy string'length+1
  643. clc
  644.  
  645. jsr plot
  646. lda rvs'text
  647. sta 199
  648. lda box'color
  649. sta 646
  650.  
  651. ldy #0
  652.  
  653. - lda string3,y
  654. jsr $ffd2
  655. iny
  656. cpy string'length
  657. bne -
  658.  
  659. - bit 197
  660. bvs -
  661.  
  662. lda #6
  663. sta number
  664. jsr screen'restore
  665. rts
  666.  
  667. ;**** SET MESSAGE ****
  668. ;sys 2048,2,fade?,fade color,rvs text?,box/text col,start line,char,string
  669.  
  670.  
  671. set'message lda number
  672. sta fade'screen
  673. lda number+1
  674. sta fade'color
  675. lda number+2
  676. sta rvs'text
  677. lda number+3
  678. sta box'color
  679. sta box'parms+5
  680. lda number+4
  681. cmp #21
  682. bcc +
  683. lda #20
  684. + sta starting'line
  685. sta box'parms
  686. clc
  687. adc #3
  688. sta box'parms+1
  689. lda number+5
  690. sta box'parms+4
  691. rts
  692.  
  693. plot cpx #25
  694. bcs +
  695. jsr $fff0
  696. + rts
  697.  
  698. ;**** RVS **** lin,tlin,col,to col,color <128
  699.  
  700. rvs lda number
  701. cmp #25
  702. bcc +
  703. rts
  704. + asl
  705. tay
  706. lda color'mem,y
  707. sta 251
  708. lda screen'mem,y
  709. sta 253
  710. iny
  711. lda color'mem,y
  712. sta 252
  713. lda screen'mem,y
  714. sta 254
  715.  
  716. ldy number+3
  717. - lda (253),y
  718. eor #128
  719. sta (253),y
  720. lda number+4
  721. bmi +
  722. sta (251),y
  723. + dey
  724. bmi +
  725. cpy number+2
  726. bcs -
  727. + rts
  728.  
  729. ;directory
  730.  
  731. dir lda string'length
  732. ldy #>string3
  733. ldx #<string3
  734. jsr $ffbd;          setnam
  735. lda #17;            file number
  736. ldx device
  737. ldy #0
  738. jsr $ffba; n        setlfs
  739. jsr $ffc0;           open
  740. ldx #17
  741. jsr $ffc6;         
  742.  
  743. jsr $ffcf;            get byte
  744. jsr $ffcf;             get byte;        skip first two bytes
  745.  
  746. first jsr $ffb7;     read status
  747. and #64
  748. bne dir'out
  749.  
  750. jsr $ffcf;             get byte
  751. jsr $ffcf;             get byte;         skip two bytes
  752.  
  753. second jsr $ffb7
  754. and #64;              eof?
  755. bne dir'out
  756. jsr $ffcf;             get byte
  757. tax
  758. jsr $ffcf;             get byte
  759. jsr $bdcd
  760. lda " "
  761. jsr $ffd2
  762.  
  763. jsr $ffb7
  764. and #64;               eof?
  765. bne dir'out
  766.  
  767. third jsr $ffcf;             get byte
  768. bne +
  769.  
  770. lda #13
  771. jsr $ffd2
  772. jmp first
  773.  
  774. + jsr $ffd2
  775.  
  776. - lda 197
  777. cmp #64
  778. bne -
  779. lda 653
  780. bne -
  781.  
  782. jsr $ffb7
  783. and #64
  784. bne dir'out
  785.  
  786. jmp third
  787.  
  788. dir'out lda #17
  789. jsr $ffc3;            close17
  790. jsr $ffcc ;clear chan
  791.  
  792. rts
  793.  
  794. file'read lda string'length
  795. ldy #>string3
  796. ldx #<string3
  797. jsr $ffbd;          setnam
  798. lda #12;            file number
  799. ldx device
  800. ldy #12
  801. jsr $ffba; n        setlfs
  802. jsr $ffc0;           open
  803. ldx #12
  804. jsr $ffc6;         
  805. jsr $ffcf
  806. jsr $ffcf
  807.  
  808. gfile ldx 197
  809. cpx #63
  810. bne +
  811. - bit 197
  812. bvc -
  813. jmp file'out
  814. + jsr $ffcf;           get byte
  815. sta temp
  816. cmp flag
  817. bne +
  818. jsr press
  819. lda #0
  820. sta 212
  821. lda #147
  822. jsr $ffd2
  823. jmp gfile
  824. + cmp #";"
  825. bne +
  826. jsr print'command
  827. beq gfile
  828. + bit rvs'mode
  829. bvc +
  830. ldx #1
  831. stx 199
  832. ldx 211
  833. bne +
  834. sta temp
  835. jsr reverse'line
  836. lda temp
  837. + jsr $ffd2
  838.  
  839. bit auto'page
  840. bvc file'end
  841. cmp #13
  842. bne file'end
  843. lda 214
  844. cmp #23
  845. bne file'end
  846. jsr press
  847. lda #0
  848. sta 212
  849. lda #147
  850. jsr $ffd2
  851.  
  852. file'end jsr $ffb7
  853. and #64
  854. bne file'out
  855. beq gfile
  856.  
  857. press ldx #24
  858. ldy #8
  859. clc
  860. jsr $fff0
  861. ldy #0
  862. sty 198
  863. sty 199
  864. - lda press'a'key,y
  865. beq waitkey
  866. jsr $ffd2
  867. iny
  868. bne -
  869.  
  870. waitkey lda 197
  871. cmp #64
  872. beq waitkey
  873. lda #0
  874. sta 198
  875. rts
  876.  
  877. file'out lda #12
  878. jsr $ffc3;            close12
  879. jsr $ffcc ;clear chan
  880. jsr press
  881. rts
  882.  
  883. print'command lda 211
  884. beq +
  885. lda temp
  886. rts
  887. + jsr $ffcf;       get byte
  888.  
  889. jsr get'command
  890. lda #0
  891. rts
  892.  
  893. get'command cmp #"1"
  894. bne +
  895. lda #0
  896. sta 646
  897.  
  898. rts
  899. + cmp #"2"
  900. bne +
  901. lda #1
  902. sta 646
  903. rts
  904. + cmp #"3"
  905. bne +
  906. lda #2
  907. sta 646
  908. + cmp #"4"
  909. bne +
  910. lda #3
  911. sta 646
  912. rts
  913. + cmp #"5"
  914. bne +
  915. lda #4
  916. sta 646
  917. rts
  918. + cmp #"6"
  919. bne +
  920. lda #5
  921. sta 646
  922. rts
  923. + cmp #"7"
  924. bne +
  925. lda #6
  926. sta 646
  927. rts
  928. + cmp #"8"
  929. bne +
  930. lda #7
  931. sta 646
  932. rts
  933.  
  934. + cmp #"!"
  935. bne +
  936. lda #8
  937. sta 646
  938. rts
  939. + cmp #34
  940. bne +
  941. lda #9
  942. sta 646
  943. rts
  944. + cmp #"#"
  945. bne +
  946. lda #10
  947. sta 646
  948. rts
  949.  
  950. + cmp #"$"
  951. bne +
  952. lda #11
  953. sta 646
  954. rts
  955.  
  956. + cmp #"%"
  957. bne +
  958. lda #12
  959. sta 646
  960. rts
  961.  
  962. + cmp #"&"
  963. bne +
  964. lda #13
  965. sta 646
  966. rts
  967.  
  968. + cmp #"'"
  969. bne +
  970. lda #14
  971. sta 646
  972. rts
  973.  
  974. + cmp #"("
  975. bne +
  976. lda #15
  977. sta 646
  978. rts
  979.  
  980. + cmp #"r"
  981. bne +
  982. lda #255
  983. sta rvs'mode
  984. jsr reverse'line
  985. rts
  986.  
  987. + cmp #"R"
  988. bne +
  989. lda #0
  990. sta rvs'mode
  991. rts
  992.  
  993. + cmp #"a"
  994. bne +
  995. lda #255
  996. sta auto'page
  997.  
  998. + cmp #"A"
  999. bne +
  1000. lda #0
  1001. sta auto'page
  1002. + rts
  1003.  
  1004. reverse'line sty tempy
  1005. ldy #39
  1006. - lda (209),y
  1007. ora #128
  1008. sta (209),y
  1009. lda 646
  1010. sta (243),y
  1011. dey
  1012. bpl -
  1013. ldy tempy
  1014. rts
  1015.  
  1016. set'screen'table lda #19
  1017. jsr $ffd2
  1018. ldy #0
  1019.  
  1020. - lda 209
  1021. sta screen'mem,y
  1022. iny
  1023. lda 210
  1024. sta screen'mem,y
  1025. iny
  1026. lda 214
  1027. cmp #24
  1028. beq +
  1029. lda #17  ; cursor down
  1030. jsr $ffd2
  1031. jmp -
  1032. + lda #19
  1033. jsr $ffd2
  1034. lda 648
  1035. sta current'screen
  1036.  
  1037. rts
  1038.  
  1039. device .byt 8
  1040. numbers'to'get .buf 1
  1041. current'number .buf 1
  1042. string'len .buf 2
  1043. number .buf 9
  1044. rvs'mode .byt 0
  1045. auto'page .byt 0
  1046. flag .byt 0
  1047. string .buf 40
  1048. string2 .buf 40
  1049. string3 .buf 40
  1050. temp .buf 1
  1051. tempy .buf 1
  1052. string'length .buf 2
  1053. screen .buf 1
  1054. screens .byt $a0,$a8,$b0,$b8,$c0,$c8,$d0,$d8,$e0,$e8,$f0
  1055. ; message'parameters
  1056. fade'screen .byt 0
  1057. fade'color .byt 11
  1058. rvs'text .byt 1
  1059. box'color .byt 3
  1060. starting'line .byt 20
  1061. box'parms .byt 20,23,0,39,160,3
  1062. border .buf 9
  1063. background .buf 9
  1064. press'a'key .asc "press any key to continue":.byt 0
  1065. chunk'o'text .byt 147,159
  1066. .asc "\sys  2048,function,[parameter],[p],...":.byt 13,153
  1067. .asc "--------------------------------------":.byt 13,13,159
  1068. .asc "\function 0 @ help (no parameters)   ":.byt 13,13,13
  1069. .asc "\function 1 @ move line              ":.byt 13,13
  1070. .asc "sys  2048,1,line,to line":.byt 13,13,13
  1071. .asc "\function 2 @ display message        ":.byt 13,13
  1072. .asc "sys  2048,2,string$":.byt 13,13,13
  1073. .asc "\function 3 @ define message         ":.byt 13,13
  1074. .asc "sys  2048,3,fade screen,fade col,rev text,box/txt col,strt line,scrn code,string":.byt 13,13,13
  1075. .asc "\function 4 @ stash screen, bac/bord ":.byt 13,13
  1076. .asc "sys  2048,4,screen number":.byt 13,13,13
  1077. .asc "\function 5 @ restore screen,bac,bor ":.byt 13,13
  1078. .asc "sys  2048,5,screen number":.byt 13,13,13
  1079. .asc "\function 6 @ fill section of screen ":.byt 13,13
  1080. .asc "sys  2048,6,y,to y,x,to x,color":.byt 13,13,13
  1081. .asc "\function 7 @ make box               ":.byt 13,13
  1082. .asc "sys  2048,7,y,to y,x,to x,s-code,color":.byt 13,13,13
  1083. .asc "\function 8 @ clear line or range    ":.byt 13,13
  1084. .asc "sys  2048,8,start line, fin line":.byt 13,13,13
  1085. .byt 19:.asc "\function 9 @ character swap         ":.byt 13,13
  1086. .asc "sys  2048,9,char,to char,color<128":.byt 13,13
  1087. .asc "\function 10 @ color swap            ":.byt 13,13
  1088. .asc "sys  2048,10,color,to color":.byt 13,13,13
  1089. .asc "\function 11 @ reverse screen        ":.byt 13,13
  1090. .asc "sys  2048,11,y,to y,x,to x,color<128":.byt 13,13,13
  1091. .asc "\function 12 @ directory of disk     ":.byt 13,13
  1092. .asc "sys  2048,12,device,":.byt 34:.asc "$[wildcard=f-type]":.byt 34,13,13
  1093. .asc "\function 13 @ read text file        ":.byt 13,13
  1094. .asc "sys  2048,13,device,asc flag,":.byt 34:.asc "file":.byt 0
  1095. color'mem .word 55296
  1096. .word 55296+40
  1097. .word 55296+80
  1098. .word 55296+120
  1099. .word 55296+160
  1100. .word 55296+200
  1101. .word 55296+240
  1102. .word 55296+280
  1103. .word 55296+320
  1104. .word 55296+360
  1105. .word 55296+400
  1106. .word 55296+440
  1107. .word 55296+480
  1108. .word 55296+520
  1109. .word 55296+560
  1110. .word 55296+600
  1111. .word 55296+640
  1112. .word 55296+680
  1113. .word 55296+720
  1114. .word 55296+760
  1115. .word 55296+800
  1116. .word 55296+840
  1117. .word 55296+880
  1118. .word 55296+920
  1119. .word 55296+960
  1120. current'screen .byt 4
  1121. screen'mem .word 1024
  1122. .word 1024+40
  1123. .word 1024+80
  1124. .word 1024+120
  1125. .word 1024+160
  1126. .word 1024+200
  1127. .word 1024+240
  1128. .word 1024+280
  1129. .word 1024+320
  1130. .word 1024+360
  1131. .word 1024+400
  1132. .word 1024+440
  1133. .word 1024+480
  1134. .word 1024+520
  1135. .word 1024+560
  1136. .word 1024+600
  1137. .word 1024+640
  1138. .word 1024+680
  1139. .word 1024+720
  1140. .word 1024+760
  1141. .word 1024+800
  1142. .word 1024+840
  1143. .word 1024+880
  1144. .word 1024+920
  1145. .word 1024+960
  1146.